package com.fh.controller.dog.manage;


import com.fh.controller.base.BaseController;
import com.fh.dao.redis.RedisDao;
import com.fh.entity.Page;
import com.fh.entity.system.User;
import com.fh.service.dog.impl.CTitleServiceImpl;
import com.fh.util.BaseUtil;
import com.fh.util.Const;
import com.fh.util.DateUtil;
import com.fh.util.PageData;
import com.fh.util.layui.DataUtil;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * 文章
 */
@Controller
@RequestMapping(value = "/fontTitle")
public class FontCTitleController extends BaseController {
    //spring  依赖注入
    @Autowired
    private CTitleServiceImpl cTitleService;
    @Autowired
    private RedisDao redisDaoImpl;

   /**
        *
        * @Title:获得所有文章数据
        * @reason
        * @author :  陈豪
        * @date  2018/7/30
        */

    @RequestMapping(value = "/findFontAll")
    @ResponseBody
    public PageData findFontAll(HttpServletRequest request) throws Exception {
        PageData pageData = this.getPageData();


        try {


            List<PageData> listAlL = cTitleService.findFontAll(pageData);
            pageData.put("data", listAlL);
            pageData.put("code", "00");
            pageData.put("msg", "查询成功");
        } catch (Exception e) {
            pageData.put("code", "01");
            pageData.put("msg", "查询失败");
            e.printStackTrace();
        }

        return pageData;
    }



}
